package it.polimi.it.TravelDream.entities;

import java.io.Serializable;

import javax.persistence.*;

import java.util.Date;


/**
 * The persistent class for the FLIGHT database table.
 * 
 */
@Entity
@Table(name="flight")
@NamedQueries({
	@NamedQuery(name=Flight.FIND_ALL,query="SELECT f FROM Flight f WHERE f.idpackage IS NULL")
	          })


public class Flight implements Serializable {
	private static final long serialVersionUID = 1L;
	public static final String FIND_ALL = "Flight.findAll";
	

	@Id
	private String idbasicproduct;

	private String arrivalairport;

	@Temporal(TemporalType.DATE)
	private Date arrivaldate;

	private String departureairport;

	@Temporal(TemporalType.DATE)
	private Date departuredate;

	@Column(name="ID_BUYER")
	private String idBuyer;

	private int price;

	private int seatnumber;
	
	private String idpackage;

	public Flight() {
	}

	public String getIdbasicproduct() {
		return this.idbasicproduct;
	}

	public void setIdbasicproduct(String idbasicproduct) {
		this.idbasicproduct = idbasicproduct;
	}

	public String getArrivalairport() {
		return this.arrivalairport;
	}

	public void setArrivalairport(String arrivalairport) {
		this.arrivalairport = arrivalairport;
	}

	public Date getArrivaldate() {
		return this.arrivaldate;
	}

	public void setArrivaldate(Date arrivaldate) {
		this.arrivaldate = arrivaldate;
	}

	public String getDepartureairport() {
		return this.departureairport;
	}

	public void setDepartureairport(String departureairport) {
		this.departureairport = departureairport;
	}

	public Date getDeparturedate() {
		return this.departuredate;
	}

	public void setDeparturedate(Date departuredate) {
		this.departuredate = departuredate;
	}

	public String getIdBuyer() {
		return this.idBuyer;
	}

	public void setIdBuyer(String idBuyer) {
		this.idBuyer = idBuyer;
	}

	public int getPrice() {
		return this.price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public int getSeatnumber() {
		return this.seatnumber;
	}

	public void setSeatnumber(int seatnumber) {
		this.seatnumber = seatnumber;
	}

	public String getIdpackage() {
		return idpackage;
	}

	public void setIdpackage(String idpackage) {
		this.idpackage = idpackage;
	}
	

}